Developer Documentation

QuickTime 4 API Documentation

Road Map to QuickTime 4

Sequence Grabber Components

This chapter discusses sequence grabber components. These components allow applications to obtain digitized data from external sources, such as video capture boards. The digitized data can be previewed, saved as a QuickTime movie, or both. Sequence grabber components allow applications to capture audio and video easily, without concern for the details of how the data is acquired.

Sequence grabber components rely on the services of lower-level components, called channel components, to obtain digitized data from different sources. For example, a single sequence grabber component could provide an application with video and audio data, using the services of different channel components for audio and video. The channel components, in turn, may rely on the services of still lower-level components, such as video digitizer components. The application programmer is shielded from these complexities, but developers creating sequence grabber components or sequence grabber channel components will need to understand them.

This chapter is written from the perspective of the applications programmer. If you are creating a sequence grabber component, your component must support the interfaces defined in this chapter.

About Sequence Grabber Components

Inside Macintosh gives a good overview of sequence grabber components, channel components, video digitizer components, and panel components (used to provide dialogs). A diagram is included, showing how the components work with applications, and with each other.

New Features of Sequence Grabber Components

QuickTime 4 Reference describes features added to sequence grabber components since QuickTime 1.6. The new features include the ability to assign a separate file for each channel of captured data (to save audio and video to separate files, for example), use of data handler components (to improve network performance, for example), and automatic support for timecode tracks. Improved support for digitizing video in Windows is also discussed.

Using Sequence Grabber Components

Inside Macintosh gives the component type definition for a sequence grabber component. The constants are then defined for request codes for each function that a sequence grabber component may support.

Previewing and Recording Captured Data

Inside Macintosh discusses the steps you need to follow in order to preview or record data from a sequence grabber component, such as opening a connection, initializing the component, and so on.

Playing Captured Data and Saving It in a QuickTime Movie

Inside Macintosh supplies a sample program that shows how to use a sequence grabber component to preview and record captured data. The program is divided into groups of functions that perform important sub-tasks.

Sequence Grabber Component Functions

Inside Macintosh gives a brief overview of the kinds of functions that a sequence grabber component provides.

Configuring Sequence Grabber Components

Inside Macintosh defines the functions that allow you to establish the environment for grabbing or previewing digitized data. This includes steps such as initializing the component, establishing the channels that will be used, defining the display environment, and choosing destination files for record operations. QuickTime 4 Reference adds new functions that allow you to set up data references as outputs for recording.

New:

Original:

Working with Sequence Grabber Outputs

QuickTime 4 Reference defines functions which allow you to manipulate the sequence grabber's output. For simple capture to a file, the functions defined previously, SGGetDataOutput or the newer SGSetDataRef , can be used. If you wish to capture data into multiple files or data references simultaneously, you will need to use the functions defined here.

Storing captured data in multiple files

QuickTime 4 Reference defines the functions used to store data into multiple output files. An example would be storing the audio and video output into separate files. These functions are used in conjunction with the sequence grabber output functions defined above.

Controlling Sequence Grabber Components

Inside Macintosh defines the functions that allow your application to control the preview or record operation. Use these functions to start, stop, pause, and retrieve a data reference to the movie created during a record operation. Also defined is the SGIdle function, which should be called as often as possible during sequence grabber operations. QuickTime 4 Reference adds a function that returns the component's mode, and adds a flag to SGGrabPict that selects the fastest possible image capture.

New:

Changed:

Original:

Working With Sequence Grabber Settings

Inside Macintosh defines the functions that allow you to display the sequence grabber settings dialog box to the user, and to work with the configuration of each of the grabber's channels. This provides application-level access to settings controlling channel components and panel components. QuickTime 4 Reference documents a new flag that allows you to restrict a settings dialog to show only the options for preview operations.

Changed:

Original:

Working With Sequence Grabber Characteristics

Inside Macintosh defines the functions that allow you to control the characteristics of the sequence grabber component, such as maximum recording time. Characteristics of the individual channels are controlled using the functions defined in the "Working With Channel Characteristics" section, below.

Working With Channel Characteristics

Inside Macintosh defines the functions used to configure the channels that the sequence grabber will use. Additional functions, which are applicable only to audio or video channels, are defined the sections, "Working With Video Channels," and "Working With Sound Channels," below.

Working With Channel Devices

Inside Macintosh defines a number of functions that allow you to determine the device that is attached to a given sequence grabber channel.

Working With Video Channels

Inside Macintosh defines several functions that allow you to configure a channel that is used specifically for video.

Working With Sound Channels

Inside Macintosh defines several functions that allow you to configure a channel that is used specifically for audio.

Video Channel Callback Functions

Inside Macintosh shows you how to make the sequence grabber use video channel callback functions defined in your application. The sequence grabber will call these functions at specific points in the process of collecting, compressing, and displaying the source video data. Defining callback functions gives you more precise control over the process, and allows you to customize a sequence grabber component's behavior. Examples of how to define callback functions are found in the "Application-Defined Functions" section, below. The points at which your callback functions will be called are referred to as video bottlenecks.

Utility Functions for Video Channel Callback Functions

Inside Macintosh defines some utility functions that your callback functions can use to gather information or to provide default behavior.

Application-Defined Functions

Inside Macintosh shows you how to define callback functions that will be used by a sequence grabbler component. Defining callback functions gives you more precise control over a sequence grabber component, and allows you to customize the component's behavior. These functions are optional, except for the MyModalFilter function, which your application must provide if it uses the SGSettingsDialog function.

Data Types

Inside Macintosh describes and defines the compression information and frame information data structures. This will be primarily of interest to developers who are creating their own sequence grabber components.

Constants

Inside Macintosh defines the constants and flags you will use to communicate with sequence grabber components. QuickTime 4 Reference adds two new flags, one to provide the fastest possible image capture, and one to eliminate unnecessary dialog options when the user is only previewing, and not compressing and recording data.

New:


© 1999 Apple Computer, Inc.